function fig_delta_grid(delta_grid, T2, CF_del, alphaF, D0i_grid, s, optfig)

if optfig.plotfig == 1
    
    [fontname,dimension,lw,folder,color,style,~,~,fontsize_tit,~,fontsize_lab,fontsize_leg] = fn_optfig(optfig);
    
    f1 = figure('Units','inches','Position',dimension);
    
    subplot(2,1,1)
    plot(delta_grid,T2,'Color',color{1},'LineWidth',lw);
    ylabel('$T(s)$',  'interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    xlabel('Deposit Insurance $(\delta)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    title('Fiscal Shortfall','interpreter','latex','FontSize',fontsize_tit,'FontName',fontname);
    grid; axis tight; box off;
    legendCell = cellstr(strcat('$s=$',num2str(s,'%6.2f\n')));
    legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','best')
    legend('boxoff')
    
    subplot(2,1,2)
    plot(delta_grid,alphaF,'Color',color{1},'LineWidth',lw);
    ylabel('$\alpha_F(s)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    xlabel('Deposit Insurance $(\delta)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    title('Recovery Rate After Failure','interpreter','latex','FontSize',fontsize_tit,'FontName',fontname);
    grid; axis tight; box off;
    ylim([0,1])
    legendCell = cellstr(strcat('$s=$',num2str(s,'%6.2f\n')));
    legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','best')
    legend('boxoff')
    
    f2 = figure('Units','inches','Position',dimension);
    
    for i=1:length(D0i_grid)
        plot(delta_grid,CF_del(:,i),'Color',color{i},'LineStyle',style{i},'LineWidth',lw); hold on;
    end
    
    ylabel('$C^F_{ti}(s)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    xlabel('Deposit Insurance $(\delta)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    title('Consumption After Failure','interpreter','latex','FontSize',fontsize_tit,'FontName',fontname);
    grid; axis tight; box off;
    legendCell = cellstr(strcat('$D_{0i}=$',num2str(D0i_grid,'%7.2f\n')));
    legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','best')
    legend('boxoff')
    
    %     legendCell = cellstr(strcat('$D_{0i}=$',num2str(D0i_grid,'%6.2f\n')));
    %     legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','northwest')
    
    name = 'T_alphaF_delta';
    print(f1,'-depsc','-painters','-noui','-r600',[folder,name,'.eps'])
    name = 'delta_grid_i';
    print(f2,'-depsc','-painters','-noui','-r600',[folder,name,'.eps'])
    
    if optfig.close == 1; close(who('f')); end
    
end
